{% extends 'fs/base.html' %}

{% load static %}
{% load fs_extras %}

{% block title %}
    {{ current_path }}
{% endblock %}

{% block search_box %}
    <input class="searchbox" style="width:480px" id="search" name="search" type="text" title="Search Everything" value="{{ search }}" >
{% endblock %}

{% block content %}

<tr><td colspan="4"><p class="numresults">{{ entries.count }}个结果</p></td></tr>
<tr>
    <td class="nameheader">
        <a href="/?search={{ search }}&amp;sort=name&amp;ascending=0">
            <span class="nobr"><nobr>名称<img class="updown" src="{% static 'fs/up.gif' %}" alt=""></nobr></span>
        </a>
    </td>
    <td class="pathheader">
        <a href="/?search={{ search }}&amp;sort=path&amp;ascending=1"><span class="nobr"><nobr>目录</nobr></span></a>
    </td>
    <td class="sizeheader">
        <a href="/?search={{ search }}&amp;sort=size&amp;ascending=0">
            <span class="nobr"><nobr>大小</nobr></span>
        </a>
    </td>
    <td class="modifiedheader">
        <a href="/?search={{ search }}&amp;sort=date_modified&amp;ascending=0">
            <span class="nobr"><nobr>修改日期</nobr></span>
        </a>
    </td>
</tr>
<tr><td colspan="4" class="lineshadow" height="1"></td></tr>
{% for entry in entries %}
{% if entry.is_dir %}
<tr class="trdata1">
    <td class="folder">
        <span class="nobr">
            <nobr>
                <a href="{% url 'fs:fs_list' entry.path %}"><img class="icon" src="{% static 'fs/folder.gif' %}" alt="">{{ entry.name }}</a>
            </nobr>
        </span>
    </td>
    <td class="pathdata">
        <span class="nobr">
            <nobr>
                <a href="{% url 'fs:fs_list' entry.directory %}"><span class="nobr"><nobr>{{ entry.directory }}</nobr></span></a>
    </td>
    <td class="sizedata">
        <span class="nobr"><nobr></nobr></span>
    </td>
    <td class="modifieddata">
        <span class="nobr"><nobr><span class="nobr"><nobr>{{ entry.modified_time }}</nobr></span>
    </td>
</tr>
{% else %}

<tr class="trdata1">
    <td class="file">
        <span class="nobr">
            <nobr><a href="{% url 'fs:download_path' entry.path %}">
                    <img class="icon" src="{% static 'fs/file.gif' %}" alt="">{{ entry.name }}
                </a>
            </nobr>
        </span>
    </td>
    <td class="pathdata">
        <span class="nobr">
            <nobr>
                <a href="{% url 'fs:fs_list' entry.directory %}">
                    <span class="nobr">
                        <nobr>{{ entry.directory }}</nobr>
                    </span>
                </a>
    </td>
    <td class="sizedata">
        <span class="nobr">
            <nobr>{{ entry.size | convert_size }}</nobr>
        </span>
    </td>
    <td class="modifieddata">
        <span class="nobr">
            <nobr>
                <span class="nobr">
                    <nobr>{{ entry.modified_time }}</nobr>
                </span>
    </td>
</tr>

{% endif %}
{% endfor %}


{% endblock %}